import { createApp } from 'vue'
import "./style/index.scss"
import "dock-ui/lib/index.css"
import router from './router'

import App from './App.vue'
import './samples/node-api'

const app = createApp(App)
app.use(router)

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
app.use(ElementPlus)

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  let name = 'el-icon-' + key.replace(/(A-Z)/g, '-$1').toLocaleLowerCase();
  app.component(name, component)
}

app.mount('#app')
  .$nextTick(() => {
    postMessage({ payload: 'removeLoading' }, '*')
  })
